package command

import (
	"context"
	"ddd-practice/domain"
)

type PutOnShelvesHandler struct {
	productRepo domain.Repository
}

func NewPutOnShelvesHandler(repository domain.Repository) PutOnShelvesHandler {
	return PutOnShelvesHandler{
		productRepo: repository,
	}
}

func (h PutOnShelvesHandler) Handle(ctx context.Context, cmd *domain.Product) error {
	return h.productRepo.PutOnShelves(ctx, cmd)
}
